(Quick Reference)

create-app

Purpose

The starting point for Grails. This command creates a Grails application using the name specifed by the user. A subdirectory within the directory the command was executed from is then created based on the specified application name.

Examples

Create an application in a directory that matches the application name:

$ grails create-app bookstore
$ cd bookstore

Create an application in the current directory:

$ mkdir bookstore
$ cd bookstore
$ grails create-app --inplace

Create an application customizing the profile and features (since Grails 3.1):

$ grails create-app bookstore --profile web --features mongodb,asset-pipeline
$ grails create-app bookstore --profile rest-api --features hibernate

Arguments:

  • profile - The profile to use to create the application

  • features - The features to use when creating the application

  • inplace - Whether to create the application within the current directory

Description

The create-app command is responsible for creating an application. By default the command will create an application using the "web" profile. For other available profiles use the list-profiles and profile-info commands to find out what profiles are available. For more information on profiles see the Profiles section of the user guide.

Usage:

grails create-app <<name>> [--profile] <<profile name>> [--features] <<FEATURE NAMES>>